package com.lhd.action.state;

/**
 * @Author: liuhd
 * @Date: 2024/12/17 21:19
 * @Description:
 */
public class RunState extends LiftState {
    @Override
    public void open() {
        System.out.println("电梯正在运行,无法开门");
    }

    @Override
    public void close() {
        System.out.println("电梯正在运行,无法关门");
    }

    @Override
    public void run() {
        System.out.println("电梯正在运行");
    }

    @Override
    public void stop() {
        context.setLiftState(new StopState());
        context.stop();
    }
}
